class_name WeaponStateAnim_AdditionalEffect_ShotBullet
extends WeaponStateAnim_AdditionalEffect

#region 属性
@export var shot_time:float = 0.2
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
func init_additional_effect(weapon_state:WeaponState):
	super.init_additional_effect(weapon_state)
func excute() -> Array[Util.AddCallMethodTrackRes]:
	super.excute()
	var reses:Array[Util.AddCallMethodTrackRes] = []
	if not weapon_state.anim_name:
		return reses
	var anim:Animation = weapon_state.state_manager.get_animation(weapon_state.anim_name)
	if anim:
		var c_ex_method = weapon.get_component_by_name("WeaponC_ExtensionMethod")
		var method_name = c_ex_method.ex_method_dict.ShotBullet.method_names.shot_bullet
		var bind_obj = c_ex_method.ex_method_dict.ShotBullet.object
		var res = Util.add_call_method_track_and_method(weapon.animation_player,weapon_state.anim_name,shot_time,method_name,[],bind_obj)
		reses.append(res)
	return reses
#endregion
#region 公共方法
#endregion
#region 私有方法
#endregion
#region 生命周期函数
#endregion
